using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data {
	public partial class FeatureMap
		: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Feature> {
		public FeatureMap() {
			// table
			ToTable("mc_Feature", "dbo");

			// keys
			HasKey(t => t.Id);

			// Properties
			Property(t => t.Id)
				.HasColumnName("Id")
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
				.IsRequired();
			Property(t => t.Name)
				.HasColumnName("Name")
				.HasMaxLength(50)
				.IsRequired();
			Property(t => t.Type)
				.HasColumnName("Type")
				.IsRequired();
			Property(t => t.ParentId)
				.HasColumnName("ParentId")
				.IsRequired();
			Property(t => t.Depth)
				.HasColumnName("Depth")
				.IsRequired();
			Property(t => t.Path)
				.HasColumnName("Path")
				.HasMaxLength(255)
				.IsRequired();
			Property(t => t.Remark)
				.HasColumnName("Remark")
				.HasMaxLength(255)
				.IsOptional();
			Property(t => t.Url)
				.HasColumnName("Url")
				.HasMaxLength(255)
				.IsOptional();
			Property(t => t.Icon)
				.HasColumnName("Icon")
				.HasMaxLength(50)
				.IsOptional();
			Property(t => t.Sort)
				.HasColumnName("Sort")
				.IsRequired();

			// Relationships
		}
	}
}
